
<nav class="navbar navbar-default navbar-static-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" data-toggle="collapse" data-target="#navbar" class="navbar-toggle collapsed">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="/" class="navbar-brand"><img src="/logo2.png" width="180px"></a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="{% if title == 'Início' %}active{% endif %}"><a href="/">Início</a></li>
        <li class="{% if title == 'Contato' %}active{% endif %}"><a href="/contato">Contato</a></li>
      </ul>
    <ul class="nav navbar-nav navbar-right">
    {% if user %}
      <li class="dropdown">
        <a href="#" data-toggle="dropdown" class="navbar-avatar dropdown-toggle">
          {% if user.picture %}
            <img src="{{ user.picture }}">
          {% else %}
            <img src="{{ user.gravatar }}">
          {% endif %}
          {% if user.name %}
            {{ user.name }}
          {% elif user.email %}
            {{ user.email }}
          {% else %}
            {{ user.id }}
          {% endif %}
          <i class="caret"></i>
        </a>
        <ul class="dropdown-menu">
          <li><a href="/account">Minha Conta</a></li>
          <li class="divider"></li>
          <li><a href="/logout">Sair</a></li>
        </ul>
      </li>
    {% else %}
      <li class="{% if title == 'Entrar' %}active{% endif %}"><a href="/login">Entrar</a></li>
      <li class="{% if title == 'Criar Conta' %}active{% endif %}"><a href="/signup">Criar Conta</a></li>
    {% endif %}
    </ul>
    </div>
  </div>
</nav>
